package degreeAndSyllabus;

import java.util.LinkedList;
import java.util.List;

/**
 * @author Nati
 */
public class Syllabus { // plan de estudio
	/* ******************************** Variables ******************************** */
	private int year;
	private List <SubjectInPlan> obligatorias = new LinkedList<SubjectInPlan>(); 
	private List <SubjectInPlan> electivas = new LinkedList<SubjectInPlan>(); 
	private List <SubjectInPlan> complementarias = new LinkedList<SubjectInPlan>();
	
	/* ******************************* Constructor ******************************* */
	public Syllabus(int year) {
		this.year = year;
	}
	
	/* ********************************* Metodos ********************************* */
	public boolean tieneCorrelativas (){
		return ! this.getComplementarias().isEmpty();
	}
	
	public List <SubjectInPlan> materiasEnPlan (){
		List <SubjectInPlan> materias = new LinkedList<SubjectInPlan>();
		materias.addAll(this.getObligatorias());
		materias.addAll(this.getElectivas());
		materias.addAll(this.getComplementarias());
		return materias; 
	}

	/* ******************************** Get & Set ******************************** */
	public void setYear(int year) {
		this.year = year;
	}

	public int getYear() {
		return year;
	}

	public void setObligatorias(List <SubjectInPlan> obligatorias) {
		this.obligatorias = obligatorias;
	}

	public List <SubjectInPlan> getObligatorias() {
		return obligatorias;
	}

	public void setElectivas(List <SubjectInPlan> electivas) {
		this.electivas = electivas;
	}

	public List <SubjectInPlan> getElectivas() {
		return electivas;
	}

	public void setComplementarias(List <SubjectInPlan> complementarias) {
		this.complementarias = complementarias;
	}

	public List <SubjectInPlan> getComplementarias() {
		return complementarias;
	}
}
